package com.jnks.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 字典表
 * </p>
 *
 * @author Ryo
 * @since 2024-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("dictionary_t")
@JsonIgnoreProperties(ignoreUnknown = true)
public class DictionaryTDO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 状态名称
     */
    private String name;

    /**
     * 状态值
     */
    private Integer datavalue;

    /**
     * 是否可用状态，1-可用，0-不可以
     */
    private Integer status;

    /**
     * 状态类型
     */
    @TableField("typeId")
    private Integer typeId;

    /**
     * 是否默认
     */
    private Integer isdefault;

    /**
     * 备注
     */
    private String remark;

    private Integer isendstatus;

    @TableField("tagStatus")
    private String tagStatus;

    private String code;

    private Integer pid;
    private String columnName;

    @JsonIgnoreProperties
    public String getKey() {
        return datavalue.toString();
    }

    @JsonIgnoreProperties
    public String getIdKey() {
        return id.toString();
    }


}
